extends Control


func _ready() -> void:
	var os_name := OS.get_name()
	var ip_address := ""
	
	match os_name:
		"Windows":
			ip_address = IP.get_local_addresses()[3]
		"Android":
			ip_address = IP.get_local_addresses()[0]
		"Linux":
			ip_address = IP.get_local_addresses()[3]
		_:
			for ip in IP.get_local_addresses():
				if ip.begins_with("192.168.") and not ip.ends_with(".1"):
					ip_address = ip
	
	$UserInfo/LocalIP.text = "本地IP：" + ip_address
